package com.qsl.ssyx.activity.mapper;

import com.qsl.ssyx.model.activity.ActivityInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qsl.ssyx.model.activity.ActivityRule;
import com.qsl.ssyx.model.activity.ActivitySku;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 活动表 Mapper 接口
 * </p>
 *
 * @author 青衫泪
 * @since 2023-08-28
 */
public interface ActivityInfoMapper extends BaseMapper<ActivityInfo> {

    //    根据商品Id获取商品对应活动规则
    List<ActivityRule> findActivityRule(Long skuId);

    // 根据所有skuId列表获取商品参与的活动信息
    List<ActivitySku> selectCartActivity(@Param("skuIdList") List<Long> skuIdList);
}
